
<?if($year && $month) {
	$list=history($year,$month);
	if(!$list)$list="<tr><td colspan=10>nothig</td></tr>";
	$opt[$month]='selected';
	$opt1[$year]='selected';
}else $list="<tr><td colspan=10>selectr period</td></tr>";

?>

<table class="bTable" cellspacing=0>
<tr>
	<form action="<? $params[sid]=$sid;
					$params[action]="history";
			echo "$baseURL/admin/payments/?".encode_params($params);?>" method='POST' >
	<th colspan=10>
		<select type=select name=year>
			<option value='2003' <?=$opt1[2003]?>>2003</option>
			<option value='2004' <?=$opt1[2004]?>>2004</option>
			<option value='2005' <?=$opt1[2005]?>>2005</option>
			<option value='2006' <?=$opt1[2006]?>>2006</option>
			<option value='2007' <?=$opt1[2007]?>>2007</option>
		</select>
		<select type=select name=month>
			<option value='1' <?=$opt[1]?>>01 (11 previos year)</option>
			<option value='2' <?=$opt[2]?>>02 (12 previos year)</option>
			<option value='3' <?=$opt[3]?>>03 (01 this year)</option>
			<option value='4' <?=$opt[4]?>>04 (02 this year)</option>
			<option value='5' <?=$opt[5]?>>05 (03 this year)</option>
			<option value='6' <?=$opt[6]?>>06 (04 this year)</option>
			<option value='7' <?=$opt[7]?>>07 (05 this year)</option>
			<option value='8' <?=$opt[8]?>>08 (06 this year)</option>
			<option value='9' <?=$opt[9]?>>09 (07 this year)</option>
			<option value='10' <?=$opt[10]?>>10 (08 this year)</option>
			<option value='11' <?=$opt[11]?>>11 (09 this year)</option>
			<option value='12' <?=$opt[12]?>>12 (10 this year)</option>
		</select>
		<input type=submit value='Set Period'>
	</th>
	</tr>
	<tr><th>reseller</th><th>date</th><th>amount</th></tr>
	<?=$list?>
	</form>
</tr>

</table>
